package logic.p6_exception;

/**
 * @ClassName: Java
 * @description:
 * @author: zxf
 * @create: 2021-06-12 10:34
 **/
public class Stu extends Person{

    private String stuId;

    public Stu(String stuId,String name,Integer age) {
        super(name, age);
        this.stuId = stuId;
    }

    // 重写的方法异常不能大于父类的异常
    @Override
    public void sports() throws Exception {
        try {

        }catch (Exception e){
            throw new Exception();
        }
        System.out.println("student sports");
    }
}

